#include<stdlib.h>
#include<stdio.h>
#include<windows.h>
#include "bib.h"



void afficher_grille(sudoku g)
{int nbr=0,i,j;

     printf("   Score : %.0f \n\n",g.score);
     Color(7,0);
     printf(" \t\t |---------|---------|---------|\n");
     printf(" \t\t | 0  1  2 | 3  4  5 | 6  7  8 |\n")  ;
     for(i=0;i<9;i++)
     {               Color(7,0);
                     if(i%3!=0)
                     printf("\t\t%d",i);
                     if(i%3==0)
                     printf("\t\t-|---------|---------|---------|\n\t\t%d",i);
                     for(j=0;j<9;j++)
                     {
                         Color(7,0);
                         if(j%3==0)
                         printf("|");
                         if(g.grille[i][j]!=0)
                         {
                                              Color(7,0);
                                              printf(" %d ",g.grille[i][j]);
                         }
                         else
                         {
                                              Color(12,0);
                                              printf(" . ");Color(7,0);
                         }
                     }
                     printf("|\n\t\t-|         |         |         |\n");
     }
     printf(" \t\t |---------|---------|---------|\n");
}








